// Contains collision detectors for ball objects

#ifndef COOLPOOL_SIMULATION_SIMOBJECTS_BALLCOLLISIONDETECTORS_H_
#define COOLPOOL_SIMULATION_SIMOBJECTS_BALLCOLLISIONDETECTORS_H_

#include "CollisionDetector.h"
#include "Ball.h"
#include "Rectangle.h"
#include "ObjectTypes.h"
#include "SimObjectsExceptions.h"

namespace coolpool
{
	// Detects collision between two balls.
	class BallBallCollisionDetector: public CollisionDetector
	{
	public:
		BallBallCollisionDetector()
		{
		}

		virtual ~BallBallCollisionDetector()
		{
		}

		virtual Collision * detect(Entity * entity1, Entity * entity2) const throw (UnexpectedInputException);
	};

	// Detects collision between a ball and a rectangle.
	class BallRectangleCollisionDetector: public CollisionDetector
	{
	public:
		BallRectangleCollisionDetector()
		{
		}

		virtual ~BallRectangleCollisionDetector()
		{
		}

		virtual Collision * detect(Entity * rectangle, Entity * ball) const throw (UnexpectedInputException);
	};
}

#endif
